<!doctype html>
{% include _blocks/title.html %}
{% include _blocks/page_class.html %}
{% include _blocks/sidebar.html %}
{% include _blocks/script_extra.html %}

{% assign html_class = 'theme-next ' | append: site.scheme %}
{% if site.use_motion %}
  {% assign html_class = html_class | append: ' use-motion' %}
{% endif %}

<html class="{{ html_class | downcase }}" lang="{{ site.language }}">
<head>
  {% include _partials/head.html %}
  <title>{{ title }}</title>
  {% include _third-party/analytics/index.html %}
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="{{ page.lang | default: page.language | default: site.language }}">

  {% assign container_class = "container " %}
  {% if site.sidebar.position %}
    {% assign container_class = container_class | append: 'sidebar-position-' | append: site.sidebar.position %}
  {% endif %}

  <div class="{{ container_class }} {{ page_class }} ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"> {% include _partials/header.html %} </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            {{ content }}
          </div>
          {% include _third-party/duoshuo-hot-articles.html %}
          {% include _partials/comments.html %}
        </div>
        {% if site.sidebar.display != 'remove' %}
          {{ sidebar }}
        {% endif %}
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        {% include _partials/footer.html %}
        {% include _third-party/analytics/busuanzi-counter.html %}
        {{ footer }}
      </div>
    </footer>

    {% unless site.sidebar.b2t %}
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        {% if site.sidebar.scrollpercent %}
          <span id="scrollpercent"><span>0</span>%</span>
        {% endif %}
      </div>
    {% endunless %}

  </div>

  {% include _scripts/vendors.html %}
  {% include _scripts/commons.html %}

  {% assign scheme_script = '_scripts/schemes/' | append: site.scheme | downcase | append: '.html' %}
  {% include {{ scheme_script }} %}

  {{ script_extra }}

  {% include _scripts/boostrap.html %}

  {% include _third-party/comments/index.html %}
  {% include _third-party/search/index.html %}
  {% include _third-party/analytics/lean-analytics.html %}
  {% include _third-party/seo/baidu-push.html %}
  {% include _third-party/rating.html %}
  {% include _third-party/mathjax.html %}
  {% include _third-party/scroll-cookie.html %}
  {% include _third-party/exturl.html %}
</body>
</html>
